<?php
/*********************************************************************************
 * SugarCRM is a customer relationship management program developed by
 * SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
 * 
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License version 3 as published by the
 * Free Software Foundation with the addition of the following permission added
 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU Affero General Public License along with
 * this program; if not, see http://www.gnu.org/licenses or write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA.
 * 
 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
 * 
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 * 
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by SugarCRM".
 ********************************************************************************/
global $dictionary;
if(empty($dictionary['User'])){
        include('modules/Users/vardefs.php');
}
$dictionary['edanz_Editor']=$dictionary['User'];
//users of emloyees modules are not allowed to change the employee/user status.
$dictionary['edanz_Editor']['fields']['status']['massupdate']=false;
$dictionary['edanz_Editor']['fields']['is_admin']['massupdate']=false;
$dictionary['edanz_Editor']['fields']['email1']['required']=false;
$dictionary['edanz_Editor']['fields']['email_addresses']['required']=false;
$dictionary['edanz_Editor']['fields']['email_addresses_primary']['required']=false;
$dictionary['edanz_Editor']['fields']['employee_status']['function'] = array(
                'name' => 'customGetEmployeeStatusOptions',
                'returns' => 'html',
                'include' => 'modules/edanz_Editor/edanz_Editor.php'
            );

$dictionary['edanz_Editor']['fields']['tasks']=array (
                                                          'name' => 'tasks',
                                                          'vname' => 'LBL_TASKS',
                                                          'type' => 'link',
                                                          'relationship' => 'editor_tasks',
                                                          'source' => 'non-db',
                                                          );

$dictionary['edanz_Editor']['fields']['feedback']=array (
                                                          'name' => 'feedback',
                                                          'vname' => 'LBL_FEEDBACK',
                                                          'type' => 'link',
                                                          'relationship' => 'editor_feedback',
                                                          'source' => 'non-db',
                                                          );


$dictionary['edanz_Editor']['fields']['authored_papers']=array (
                                                          'name' => 'authored_papers',
                                                          'vname' => 'LBL_AUTHORED_PAPERS',
                                                          'type' => 'link',
                                                          'relationship' => 'editor_authored_papers',
                                                          'source' => 'non-db',
                                                          );


$dictionary['edanz_Editor']['fields']['qualifications']=array (
                                                          'name' => 'qualifications',
                                                          'vname' => 'LBL_QUALIFICATIONS',
                                                          'type' => 'link',
                                                          'relationship' => 'editor_qualifications',
                                                          'source' => 'non-db',
                                                          );


$dictionary['edanz_Editor']['fields']['marketing_text']=array (
                                                          'name' => 'marketing_text',
                                                          'vname' => 'LBL_MARKETING_TEXT',
                                                          'type' => 'link',
                                                          'relationship' => 'editor_marketing_text',
                                                          'source' => 'non-db',
                                                          );
														  
														  
$dictionary['edanz_Editor']['fields']['beneficiaries']=array (
                                                          'name' => 'beneficiaries',
                                                          'vname' => 'LBL_BENEFICIARIES',
                                                          'type' => 'link',
                                                          'relationship' => 'editors_beneficiaries',
                                                          'source' => 'non-db',
                                                          );
														  
$dictionary['edanz_Editor']['fields']['schedule_notes']=array (
                                                          'name' => 'schedule_notes',
                                                          'vname' => 'LBL_SCHEDULE_NOTES',
                                                          'type' => 'link',
                                                          'relationship' => 'editor_schedulenotes',
                                                          'source' => 'non-db',
                                                          );

$dictionary['edanz_Editor']['fields']['probation']=array (
                                                          'name' => 'probation',
                                                          'vname' => 'LBL_PROBATION',
                                                          'type' => 'link',
                                                          'relationship' => 'editor_probation',
                                                          'source' => 'non-db',
                                                          );

$dictionary['edanz_Editor']['fields']['documents'] = array (
	'name' => 'documents',
	'vname' => 'LBL_EDITOR_DOCUMENTS_FROM_DOCUMENTS_TITLE',
	'type' => 'link',
	'relationship' => 'editor_documents',
	'source' => 'non-db',
);

$dictionary['edanz_Editor']['fields']['completion_punctuality'] = array (
	'name' => 'completion_punctuality',
	'vname' => 'LBL_COMPLETION_PUNCTUALITY',
	'type' => 'varchar',
	'len' => 150,
	'source' => 'non-db',	
);
$dictionary['edanz_Editor']['fields']['average_quality_rating'] = array (
	'name' => 'average_quality_rating',
	'vname' => 'LBL_AVERAGE_QUALITY_RATING',
	'type' => 'decimal',
	'source' => 'non-db',
);

$dictionary['edanz_Editor']['relationships']['editor_tasks'] = array(
            'lhs_module' => 'edanz_Editor',
            'lhs_table' => 'users',
            'lhs_key' => 'id',
            'rhs_module' => 'Tasks',
            'rhs_table' => 'tasks',
                'rhs_key' => 'related_editor_id',
                'relationship_type' => 'one-to-many',
        );

$dictionary['edanz_Editor']['relationships']['editor_feedback'] = array(
            'lhs_module' => 'edanz_Editor',
            'lhs_table' => 'users',
            'lhs_key' => 'id',
            'rhs_module' => 'edanz_Feedback',
            'rhs_table' => 'edanz_feedback',
                'rhs_key' => 'related_editor_id',
                'relationship_type' => 'one-to-many',
        );


$dictionary['edanz_Editor']['relationships']['editor_authored_papers'] = array(
            'lhs_module' => 'edanz_Editor',
            'lhs_table' => 'users',
            'lhs_key' => 'id',
            'rhs_module' => 'edanz_AuthoredPaper',
            'rhs_table' => 'edanz_authoredpaper',
                'rhs_key' => 'parent_id',
                'relationship_type' => 'one-to-many',
        );


$dictionary['edanz_Editor']['relationships']['editor_qualifications'] = array(
            'lhs_module' => 'edanz_Editor',
            'lhs_table' => 'users',
            'lhs_key' => 'id',
            'rhs_module' => 'edanz_Qualification',
            'rhs_table' => 'edanz_qualification',
                'rhs_key' => 'parent_id',
                'relationship_type' => 'one-to-many',
        );


$dictionary['edanz_Editor']['relationships']['editor_marketing_text'] = array(
            'lhs_module' => 'edanz_Editor',
            'lhs_table' => 'users',
            'lhs_key' => 'id',
            'rhs_module' => 'edanz_MarketingText',
            'rhs_table' => 'edanz_marketingtext',
                'rhs_key' => 'parent_id',
                'relationship_type' => 'one-to-many',
        );


$dictionary['edanz_Editor']['relationships']['editor_documents'] = array(
            'lhs_module' => 'edanz_Editor',
            'lhs_table' => 'users',
            'lhs_key' => 'id',
            'rhs_module' => 'Documents',
            'rhs_table' => 'documents',
                'rhs_key' => 'related_editor_id',
                'relationship_type' => 'one-to-many',
        );
		
// $dictionary['edanz_Editor']['relationships']['editor_beneficiaries'] = array(
	// 'lhs_module' => 'edanz_Editor',
	// 'lhs_table' => 'users',
	// 'lhs_key' => 'id',
	// 'rhs_module' => 'edanz_Beneficiaries',
	// 'rhs_table' => 'edanz_beneficiaries',
	// 'rhs_key' => 'related_editor_id',
	// 'relationship_type' => 'one-to-many',
// );
$dictionary['edanz_Editor']['relationships']['editor_schedulenotes'] = array (	
		'lhs_module' => 'edanz_Editor',
		'lhs_table' => 'users',
		'lhs_key' => 'id',
		'rhs_module' => 'edanz_ScheduleNotes',
		'rhs_table' => 'edanz_schedulenotes',
		'rhs_key' => 'related_editor_id',
		'relationship_type' => 'one-to-many',
	);

$dictionary['edanz_Editor']['relationships']['editor_probation'] = array (	
		'lhs_module' => 'edanz_Editor',
		'lhs_table' => 'users',
		'lhs_key' => 'id',
		'rhs_module' => 'edanz_Probation',
		'rhs_table' => 'edanz_probation',
		'rhs_key' => 'related_editor_id',
		'relationship_type' => 'one-to-many',
	);

?>
